{template 'list_header'}
<div id="main">
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <div class="box">
                    <div class="box-title">
                        <div class="pull-left">
                            <h3><i class="icon-table"></i>微场景画面<small>{$app['title']}</h3>
                        </div>
                        <div class="pull-right">
                          

                        </div>
                    </div>

                    <div class="box-content">
                        <div class="row-fluid">
                            <div class="span12 control-group">
                                <div class="pull-left">
                                    <a class="btn" href="{php echo $this->createWeburl('page',array('list_id'=>$list_id));}"><i class="icon-plus"></i>新增画面</a>
                                    <a class="btn" href="javascript:location.reload()"><i class="icon-refresh"></i>刷新</a>
                                </div>
                            </div>
                        </div>
                        <div class="row-fluid dataTables_wrapper">
                            <form action="/plus/formajax.php" method="post" class="form-horizontal">
                                <table id="listTable" class="table table-bordered table-hover dataTable">
                                <thead>
                                    <tr>
                                        <th>ID</th>									
                                        <th>排序id</th>
                                        <th>画面样式</th>
                                        <th>画面</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
								{loop $list $row}
									<tr>
                                    <td>{$row['id']}</td> 
                                    <td>{$row['listorder']}</td> 
                                    <td><img src="{php echo toimage($row['thumb'])}" style="max-height:80px;max-width:100px;"></td> 
                                    <td>
									{if $row['m_type']==1}纯图片式
									{elseif $row['m_type']==2}带按钮链接
									{elseif $row['m_type']==3}带按钮分享
									{elseif $row['m_type']==4}带电话图片
									{elseif $row['m_type']==5}带导航图片
									{else}其他模式{/if}</td> 
                                    <td>
                                     <a class="btn" href="{php echo $this->createWeburl('page',array('list_id'=>$row['list_id'],'id'=>$row['id']))}" rel="tooltip" title="编辑微场景画面"><i class="icon-edit"></i></a>
                                     <a class="btn" rel="tooltip" title="删除" href="javascript:drop_confirm('您确定要删除吗?', '{php echo $this->createWeburl('page',array('op'=>'del','list_id'=>$row['list_id'],'id'=>$row['id']))}');"><i class="icon-remove"></i></a>
                                    </td> 
                                    </tr> 
								{/loop}
                                </table>
                            </form>
                          
                             
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<script>

$(function(){
    $(".delAll").click(function(){
        var check = $("#listTable input:checked");
        var id = new Array();
        check.each(function(i){
            id[i] = $(this).val();
        });
        $.post('/plus/formajax.php', {tid:id, aid:$('#aid').val()},function(data){
            G.ui.tips.info(data.error);
        },'json');
    });
});

function drop_confirm(msg, url){
    if(confirm(msg)){
        $.post(url, {},function(data){
            G.ui.tips.info(data.error);
            window.location = data.url;
        },'json');
    }
}
</script>
	<div style="width:100%;text-align:center;font-size:14px;color:#ff0000;display:none;">微盟技术支持 - weimob 2.0</div>
	</body>
	<script>
		window.document.onkeydown = function(e) {
			if ('BODY' == event.target.tagName.toUpperCase()) {
				var e=e || event;
　 				var currKey=e.keyCode || e.which || e.charCode;
				if (8 == currKey) {
					return false;
				}
			}
		};
	</script> 
</html>